package graphics.rasterizing.model;

import static util.MatrixOperationsF.ar;
import static util.Transformations.ones;
import static util.Transformations.transform3DTranslate;

import java.util.ArrayList;
import java.util.Collection;

public class _SimpleSceneGraphTest {
	public static void main(String[] args) {
		SimpleSceneGraph g = new SimpleSceneGraph(ones(4));
		SimpleSceneGraph trans = new SimpleSceneGraph(transform3DTranslate(ar(
				1, 1, 1, 1)));
		SimpleSceneGraph trans2 = new SimpleSceneGraph(transform3DTranslate(ar(
				-1, -1, 5, 1)));
		g.add(trans);
		g.add(trans2);
		trans.add(trans2);
		Collection<Triangle> t = new ArrayList<Triangle>();
		float[][] points = new float[3][4];
		for (int i = 0; i < points.length; i++) {
			for (int j = 0; j < points[i].length; j++) {
				points[i][j] = 0;
			}
		}
		points[0][3] = 1;
		points[1][3] = 1;
		points[2][3] = 1;
		t.add(new Triangle(points, points));
		trans.add(new SimpleSceneGraph.Tri(t, ones(4)));
		trans2.add(new SimpleSceneGraph.Tri(t, ones(4)));
		for (Triangle triangle : g.getIterator()) {
			System.out.println("abra");
			System.out.println(triangle);
		}
	}
}
